3.7 \(\int x \sinh (a+b x-c x^2) \, dx\)

Optimal. Leaf size=112 \[ -\frac{\sqrt{\pi } b e^{a+\frac{b^2}{4 c}} \text{Erf}\left (\frac{b-2 c x}{2 \sqrt{c}}\right )}{8 c^{3/2}}+\frac{\sqrt{\pi } b e^{-a-\frac{b^2}{4 c}} \text{Erfi}\left (\frac{b-2 c x}{2 \sqrt{c}}\right )}{8 c^{3/2}}-\frac{\cosh \left (a+b x-c x^2\right )}{2 c} \]

[Out]

-Cosh[a + b*x - c*x^2]/(2*c) - (b*E^(a + b^2/(4*c))*Sqrt[Pi]*Erf[(b - 2*c*x)/(2*Sqrt[c])])/(8*c^(3/2)) + (b*E^
(-a - b^2/(4*c))*Sqrt[Pi]*Erfi[(b - 2*c*x)/(2*Sqrt[c])])/(8*c^(3/2))

________________________________________________________________________________________

Rubi [A]  time = 0.0472621, antiderivative size = 112, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 14, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.357, Rules used = {5382, 5374, 2234, 2205, 2204} \[ -\frac{\sqrt{\pi } b e^{a+\frac{b^2}{4 c}} \text{Erf}\left (\frac{b-2 c x}{2 \sqrt{c}}\right )}{8 c^{3/2}}+\frac{\sqrt{\pi } b e^{-a-\frac{b^2}{4 c}} \text{Erfi}\left (\frac{b-2 c x}{2 \sqrt{c}}\right )}{8 c^{3/2}}-\frac{\cosh \left (a+b x-c x^2\right )}{2 c} \]

Antiderivative was successfully verified.

[In]

Int[x*Sinh[a + b*x - c*x^2],x]

[Out]

-Cosh[a + b*x - c*x^2]/(2*c) - (b*E^(a + b^2/(4*c))*Sqrt[Pi]*Erf[(b - 2*c*x)/(2*Sqrt[c])])/(8*c^(3/2)) + (b*E^
(-a - b^2/(4*c))*Sqrt[Pi]*Erfi[(b - 2*c*x)/(2*Sqrt[c])])/(8*c^(3/2))

Rule 5382

Int[((d_.) + (e_.)*(x_))*Sinh[(a_.) + (b_.)*(x_) + (c_.)*(x_)^2], x_Symbol] :> Simp[(e*Cosh[a + b*x + c*x^2])/
(2*c), x] - Dist[(b*e - 2*c*d)/(2*c), Int[Sinh[a + b*x + c*x^2], x], x] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b*
e - 2*c*d, 0]

Rule 5374

Int[Sinh[(a_.) + (b_.)*(x_) + (c_.)*(x_)^2], x_Symbol] :> Dist[1/2, Int[E^(a + b*x + c*x^2), x], x] - Dist[1/2
, Int[E^(-a - b*x - c*x^2), x], x] /; FreeQ[{a, b, c}, x]

Rule 2234

Int[(F_)^((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[F^(a - b^2/(4*c)), Int[F^((b + 2*c*x)^2/(4*c))
, x], x] /; FreeQ[{F, a, b, c}, x]

Rule 2205

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^2), x_Symbol] :> Simp[(F^a*Sqrt[Pi]*Erf[(c + d*x)*Rt[-(b*Log[F]),
 2]])/(2*d*Rt[-(b*Log[F]), 2]), x] /; FreeQ[{F, a, b, c, d}, x] && NegQ[b]

Rule 2204

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^2), x_Symbol] :> Simp[(F^a*Sqrt[Pi]*Erfi[(c + d*x)*Rt[b*Log[F], 2
]])/(2*d*Rt[b*Log[F], 2]), x] /; FreeQ[{F, a, b, c, d}, x] && PosQ[b]

Rubi steps

\begin{align*} \int x \sinh \left (a+b x-c x^2\right ) \, dx &=-\frac{\cosh \left (a+b x-c x^2\right )}{2 c}+\frac{b \int \sinh \left (a+b x-c x^2\right ) \, dx}{2 c}\\ &=-\frac{\cosh \left (a+b x-c x^2\right )}{2 c}+\frac{b \int e^{a+b x-c x^2} \, dx}{4 c}-\frac{b \int e^{-a-b x+c x^2} \, dx}{4 c}\\ &=-\frac{\cosh \left (a+b x-c x^2\right )}{2 c}-\frac{\left (b e^{-a-\frac{b^2}{4 c}}\right ) \int e^{\frac{(-b+2 c x)^2}{4 c}} \, dx}{4 c}+\frac{\left (b e^{a+\frac{b^2}{4 c}}\right ) \int e^{-\frac{(b-2 c x)^2}{4 c}} \, dx}{4 c}\\ &=-\frac{\cosh \left (a+b x-c x^2\right )}{2 c}-\frac{b e^{a+\frac{b^2}{4 c}} \sqrt{\pi } \text{erf}\left (\frac{b-2 c x}{2 \sqrt{c}}\right )}{8 c^{3/2}}+\frac{b e^{-a-\frac{b^2}{4 c}} \sqrt{\pi } \text{erfi}\left (\frac{b-2 c x}{2 \sqrt{c}}\right )}{8 c^{3/2}}\\ \end{align*}

Mathematica [A]  time = 0.183602, size = 134, normalized size = 1.2 \[ \frac{\sqrt{\pi } b \text{Erf}\left (\frac{2 c x-b}{2 \sqrt{c}}\right ) \left (\sinh \left (a+\frac{b^2}{4 c}\right )+\cosh \left (a+\frac{b^2}{4 c}\right )\right )+\sqrt{\pi } b \text{Erfi}\left (\frac{2 c x-b}{2 \sqrt{c}}\right ) \left (\sinh \left (a+\frac{b^2}{4 c}\right )-\cosh \left (a+\frac{b^2}{4 c}\right )\right )-4 \sqrt{c} \cosh (a+x (b-c x))}{8 c^{3/2}} \]

Antiderivative was successfully verified.

[In]

Integrate[x*Sinh[a + b*x - c*x^2],x]

[Out]

(-4*Sqrt[c]*Cosh[a + x*(b - c*x)] + b*Sqrt[Pi]*Erfi[(-b + 2*c*x)/(2*Sqrt[c])]*(-Cosh[a + b^2/(4*c)] + Sinh[a +
 b^2/(4*c)]) + b*Sqrt[Pi]*Erf[(-b + 2*c*x)/(2*Sqrt[c])]*(Cosh[a + b^2/(4*c)] + Sinh[a + b^2/(4*c)]))/(8*c^(3/2
))

________________________________________________________________________________________

Maple [A]  time = 0.033, size = 120, normalized size = 1.1 \begin{align*} -{\frac{{{\rm e}^{c{x}^{2}-bx-a}}}{4\,c}}-{\frac{b\sqrt{\pi }}{8\,c}{{\rm e}^{-{\frac{4\,ac+{b}^{2}}{4\,c}}}}{\it Erf} \left ( \sqrt{-c}x+{\frac{b}{2}{\frac{1}{\sqrt{-c}}}} \right ){\frac{1}{\sqrt{-c}}}}-{\frac{{{\rm e}^{-c{x}^{2}+bx+a}}}{4\,c}}-{\frac{b\sqrt{\pi }}{8}{{\rm e}^{{\frac{4\,ac+{b}^{2}}{4\,c}}}}{\it Erf} \left ( -\sqrt{c}x+{\frac{b}{2}{\frac{1}{\sqrt{c}}}} \right ){c}^{-{\frac{3}{2}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*sinh(-c*x^2+b*x+a),x)

[Out]

-1/4/c*exp(c*x^2-b*x-a)-1/8*b/c*Pi^(1/2)*exp(-1/4*(4*a*c+b^2)/c)/(-c)^(1/2)*erf((-c)^(1/2)*x+1/2*b/(-c)^(1/2))
-1/4/c*exp(-c*x^2+b*x+a)-1/8*b/c^(3/2)*Pi^(1/2)*exp(1/4*(4*a*c+b^2)/c)*erf(-c^(1/2)*x+1/2*b/c^(1/2))

________________________________________________________________________________________

Maxima [B]  time = 1.6792, size = 910, normalized size = 8.12 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*sinh(-c*x^2+b*x+a),x, algorithm="maxima")

[Out]

-1/2*x^2*sinh(c*x^2 - b*x - a) + 1/32*(sqrt(pi)*(2*c*x - b)*b^2*(erf(1/2*sqrt((2*c*x - b)^2/c)) - 1)/(sqrt((2*
c*x - b)^2/c)*(-c)^(5/2)) - 4*b*c*e^(-1/4*(2*c*x - b)^2/c)/(-c)^(5/2) - 4*(2*c*x - b)^3*gamma(3/2, 1/4*(2*c*x
- b)^2/c)/(((2*c*x - b)^2/c)^(3/2)*(-c)^(5/2)))*b*e^(a + 1/4*b^2/c)/sqrt(-c) + 1/32*(sqrt(pi)*(2*c*x - b)*b^3*
(erf(1/2*sqrt((2*c*x - b)^2/c)) - 1)/(sqrt((2*c*x - b)^2/c)*(-c)^(7/2)) - 6*b^2*c*e^(-1/4*(2*c*x - b)^2/c)/(-c
)^(7/2) - 12*(2*c*x - b)^3*b*gamma(3/2, 1/4*(2*c*x - b)^2/c)/(((2*c*x - b)^2/c)^(3/2)*(-c)^(7/2)) - 8*c^2*gamm
a(2, 1/4*(2*c*x - b)^2/c)/(-c)^(7/2))*c*e^(a + 1/4*b^2/c)/sqrt(-c) - 1/32*(sqrt(pi)*(2*c*x - b)*b^2*(erf(1/2*s
qrt(-(2*c*x - b)^2/c)) - 1)/(sqrt(-(2*c*x - b)^2/c)*c^(5/2)) + 4*b*e^(1/4*(2*c*x - b)^2/c)/c^(3/2) - 4*(2*c*x
- b)^3*gamma(3/2, -1/4*(2*c*x - b)^2/c)/((-(2*c*x - b)^2/c)^(3/2)*c^(5/2)))*b*e^(-a - 1/4*b^2/c)/sqrt(c) + 1/3
2*(sqrt(pi)*(2*c*x - b)*b^3*(erf(1/2*sqrt(-(2*c*x - b)^2/c)) - 1)/(sqrt(-(2*c*x - b)^2/c)*c^(7/2)) + 6*b^2*e^(
1/4*(2*c*x - b)^2/c)/c^(5/2) - 12*(2*c*x - b)^3*b*gamma(3/2, -1/4*(2*c*x - b)^2/c)/((-(2*c*x - b)^2/c)^(3/2)*c
^(7/2)) - 8*gamma(2, -1/4*(2*c*x - b)^2/c)/c^(3/2))*sqrt(c)*e^(-a - 1/4*b^2/c)

________________________________________________________________________________________

Fricas [B]  time = 2.08255, size = 883, normalized size = 7.88 \begin{align*} -\frac{2 \, c \cosh \left (c x^{2} - b x - a\right )^{2} - \sqrt{\pi }{\left (b \cosh \left (c x^{2} - b x - a\right ) \cosh \left (\frac{b^{2} + 4 \, a c}{4 \, c}\right ) - b \cosh \left (c x^{2} - b x - a\right ) \sinh \left (\frac{b^{2} + 4 \, a c}{4 \, c}\right ) +{\left (b \cosh \left (\frac{b^{2} + 4 \, a c}{4 \, c}\right ) - b \sinh \left (\frac{b^{2} + 4 \, a c}{4 \, c}\right )\right )} \sinh \left (c x^{2} - b x - a\right )\right )} \sqrt{-c} \operatorname{erf}\left (\frac{{\left (2 \, c x - b\right )} \sqrt{-c}}{2 \, c}\right ) - \sqrt{\pi }{\left (b \cosh \left (c x^{2} - b x - a\right ) \cosh \left (\frac{b^{2} + 4 \, a c}{4 \, c}\right ) + b \cosh \left (c x^{2} - b x - a\right ) \sinh \left (\frac{b^{2} + 4 \, a c}{4 \, c}\right ) +{\left (b \cosh \left (\frac{b^{2} + 4 \, a c}{4 \, c}\right ) + b \sinh \left (\frac{b^{2} + 4 \, a c}{4 \, c}\right )\right )} \sinh \left (c x^{2} - b x - a\right )\right )} \sqrt{c} \operatorname{erf}\left (\frac{2 \, c x - b}{2 \, \sqrt{c}}\right ) + 4 \, c \cosh \left (c x^{2} - b x - a\right ) \sinh \left (c x^{2} - b x - a\right ) + 2 \, c \sinh \left (c x^{2} - b x - a\right )^{2} + 2 \, c}{8 \,{\left (c^{2} \cosh \left (c x^{2} - b x - a\right ) + c^{2} \sinh \left (c x^{2} - b x - a\right )\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*sinh(-c*x^2+b*x+a),x, algorithm="fricas")

[Out]

-1/8*(2*c*cosh(c*x^2 - b*x - a)^2 - sqrt(pi)*(b*cosh(c*x^2 - b*x - a)*cosh(1/4*(b^2 + 4*a*c)/c) - b*cosh(c*x^2
 - b*x - a)*sinh(1/4*(b^2 + 4*a*c)/c) + (b*cosh(1/4*(b^2 + 4*a*c)/c) - b*sinh(1/4*(b^2 + 4*a*c)/c))*sinh(c*x^2
 - b*x - a))*sqrt(-c)*erf(1/2*(2*c*x - b)*sqrt(-c)/c) - sqrt(pi)*(b*cosh(c*x^2 - b*x - a)*cosh(1/4*(b^2 + 4*a*
c)/c) + b*cosh(c*x^2 - b*x - a)*sinh(1/4*(b^2 + 4*a*c)/c) + (b*cosh(1/4*(b^2 + 4*a*c)/c) + b*sinh(1/4*(b^2 + 4
*a*c)/c))*sinh(c*x^2 - b*x - a))*sqrt(c)*erf(1/2*(2*c*x - b)/sqrt(c)) + 4*c*cosh(c*x^2 - b*x - a)*sinh(c*x^2 -
 b*x - a) + 2*c*sinh(c*x^2 - b*x - a)^2 + 2*c)/(c^2*cosh(c*x^2 - b*x - a) + c^2*sinh(c*x^2 - b*x - a))

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int x \sinh{\left (a + b x - c x^{2} \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*sinh(-c*x**2+b*x+a),x)

[Out]

Integral(x*sinh(a + b*x - c*x**2), x)

________________________________________________________________________________________

Giac [A]  time = 1.35975, size = 166, normalized size = 1.48 \begin{align*} -\frac{\frac{\sqrt{\pi } b \operatorname{erf}\left (-\frac{1}{2} \, \sqrt{c}{\left (2 \, x - \frac{b}{c}\right )}\right ) e^{\left (\frac{b^{2} + 4 \, a c}{4 \, c}\right )}}{\sqrt{c}} + 2 \, e^{\left (-c x^{2} + b x + a\right )}}{8 \, c} + \frac{\frac{\sqrt{\pi } b \operatorname{erf}\left (-\frac{1}{2} \, \sqrt{-c}{\left (2 \, x - \frac{b}{c}\right )}\right ) e^{\left (-\frac{b^{2} + 4 \, a c}{4 \, c}\right )}}{\sqrt{-c}} - 2 \, e^{\left (c x^{2} - b x - a\right )}}{8 \, c} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*sinh(-c*x^2+b*x+a),x, algorithm="giac")

[Out]

-1/8*(sqrt(pi)*b*erf(-1/2*sqrt(c)*(2*x - b/c))*e^(1/4*(b^2 + 4*a*c)/c)/sqrt(c) + 2*e^(-c*x^2 + b*x + a))/c + 1
/8*(sqrt(pi)*b*erf(-1/2*sqrt(-c)*(2*x - b/c))*e^(-1/4*(b^2 + 4*a*c)/c)/sqrt(-c) - 2*e^(c*x^2 - b*x - a))/c